From: Carlos Garnacho Date: Fri, 6 Oct 2017 16:12:03 +0000 (+0200) Subject: gtktreeview: Transform cell area to widget coordinates X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1~1^2~428^2^2~182 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a0de570e47228094f430fcade4e6f56eb75bd8f5;p=gtk4.git gtktreeview: Transform cell area to widget coordinates GtkCellArea uses event coordinates (thus in treeview relative coordinates), but calculations used to happen in bin window coords. We can just offset the cell area by the bin window, fixes cell renderer activation and edition. --- diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 315a5d7ade..2bb539cc0e 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -2900,6 +2900,12 @@ gtk_tree_view_multipress_gesture_pressed (GtkGestureMultiPress *gesture, background_area.height = gtk_tree_view_get_row_height (tree_view, node); background_area.x = 0; + gtk_tree_view_convert_bin_window_to_widget_coords (tree_view, + background_area.x, + background_area.y, + &background_area.x, + &background_area.y); + /* Let the column have a chance at selecting it. */ rtl = (_gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL); for (list = (rtl ? g_list_last (tree_view->priv->columns) : g_list_first (tree_view->priv->columns));